package plug.creatures;

import java.io.File;

import main.java.commons.Utils.Predicate;

public class IsPlugeablePredicat implements Predicate<File>{

	
	static private IsPlugeablePredicat instance= new IsPlugeablePredicat();
	
	public static IsPlugeablePredicat getInstance() {
		return instance;
	}
	
	private IsPlugeablePredicat() {
	}
	
	@Override
	public boolean apply(File input) {
		if(input.isDirectory()){
			return true;
		}
		String fileName = input.getName();
		  String ext="";
		  int mid= fileName.lastIndexOf(".");
		  ext=fileName.substring(mid+1,fileName.length());  
		  return ext.equals("jar");
	}

}
